<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib uri="estateTag" prefix="estateTag" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>新增商品</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" href="../resource/css/global.css" type="text/css"></link>
	    <link rel="stylesheet" type="text/css" href="../resource/css/easyui/default/easyui.css"></link>
	    <link rel="stylesheet" href="../resource/css/whole.css" type="text/css"></link>
		<link rel="stylesheet" type="text/css" href="../resource/js/kindeditor/skins/default.css"></link>
		<link rel="stylesheet" href="../resource/css/memberCenter/info.css" type="text/css"></link>
				<link rel="stylesheet" href="../resource/css/memberCenter/infowithoutmenu.css"
			type="text/css"></link>
		<script type="text/javascript" src="../resource/js/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="../resource/js/kindeditor/kindeditor.js"></script>
		<script type="text/javascript" src="../resource/js/jquery-1.4.2.js"></script>
		<script type="text/javascript" src="../resource/js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../shoper/addGoods.js"></script>
		<style type="text/css">
		.info_top{
			background-position: 0 0;
		}
	</style>
	</head>

	<body><estateTag:security></estateTag:security>
		<center><jsp:include page="../index/top.jsp"></jsp:include></center>
      <div style="width: 100%;margin-top: 10px;" align="center">
      <input id="menuCls" type="hidden" value="331">
			<table width="100%" class="layoutTab">
				<tr>
					<!-- <td width="20%" align="left" valign="top"><jsp:include page="../menu.jsp"></jsp:include></td> -->
					<td valign="top">
					<form name="form" method="post"
										action="../goods/goods_addGoods.shtml"
										onsubmit="return checkmodify()" enctype="multipart/form-data">
					<div class="position" align="left"><label>您所在的位置：</label>商家后台管理&nbsp;&nbsp;--&gt;&gt;&nbsp;&nbsp;限时抢购管理&nbsp;&nbsp;--&gt;&gt;&nbsp;&nbsp;商品信息维护</div>
					<br/><div class="info_top"></div>
					<div class="info_mid">
										<table width="940px" style="margin-left: 20px;" border="0" cellpadding="1" cellspacing="1" id="userinfo">
											<tr>
												<th  align="center" colspan="2">
													<b>新增商品信息 （<font color="red">*</font> 为必填项）</b>
												</th >
											</tr>

											<tr>
												<td align="right" width="16%">
														<font color="red">*</font>商品名称:
 												</td>
												<td align="left">
														<input id="name" type="text" name="goods.name" size="80" maxlength="50"
															value="${goods.name}" />
															<input type="hidden" value="${id}" name="id"/>
												</td>
											</tr>
											<tr>
												<td align="right">
														<font color="red">*</font>原价:
												</td>
												<td align="left">
														<input type="text" id="price" name="goods.price" size="25" maxlength="5"onkeyup="isNum(this)"
															value="${goods.price}" />
												</td>
											</tr>
											<tr>
												<td align="right">
														<font color="red">*</font>抢购价:
												</td>
												<td align="left">
														<input type="text" name="goods.upprice" id="upprice" size="25" maxlength="5"onkeyup="isNum(this)"
															value="${goods.upprice}" />
												</td>
											</tr>
											<tr>
												<td align="right">
														单位:
												</td>
												<td align="left">
														<input type="text" id="units" name="goods.units" size="25" maxlength="8"
															value="${goods.units}" />
												</td>
											</tr>
											<tr>
												<td align="right">
														上限人数:
												</td>
												<td align="left">
														<input type="text" id="joinCount" name="goods.maxCount" size="25" maxlength="4"
															value="${goods.maxCount}" />
												</td>
											</tr>
											<tr>
												<td align="right">
														抢购结束时间:
												</td>
												<td align="left">
														<input type="text" name="goods.overTime" id="overTime"
																readonly="readonly" size="25"
																onFocus="WdatePicker({firstDayOfWeek:7,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
																class="Wdate" size="20" value="${goods.overTimeString}"/>
												</td>
											</tr>
											<tr>
												<td>
													<div align="right" >
														商品图片:
													</div>
												</td>
												<c:if test="${goods.imgSrc != null}">
												<td align="left">
													<img src="<%=basePath%>${goods.imgSrc}" id="img" height="100" width="100"/>&nbsp;&nbsp;&nbsp;<span id="picbtn"><input type="button"  onclick="modifyPic(picbtn)" value="修改"/></span>
												     <div id="modifyPic"></div>
												</td>
												</c:if>
												<c:if test="${goods.imgSrc == null}">
												<td align="left">
													<input type="file" name="imgcomp" id="img" size="69"/>  
												</td>
												</c:if>
											</tr>
											<tr>
												<td align="right">
														<font color="red">*</font>咨询电话:
												</td>
												<td align="left">
														<input type="text" name="goods.tel" id="tel"  maxlength="19"
															value="${goods.tel}">
												</td>
											</tr>
											<tr>
												<td align="right">
														产品简介:
												</td>
												<td align="left">
														<textarea cols="80" rows="10" id="content2" name="goods.content">${goods.content}</textarea>
												</td>
											</tr>
											<tr>
												<td align="right">
														产品描述：
												</td>
												<td align="left" id="filter_ke">
														<textarea cols="80" rows="20" id="content1" name="goods.goodsDesc">${goods.goodsDesc}</textarea>
												</td>
											</tr>
                                                  <tr>
												<td align="right">
														抢购声明：
												</td>
												<td align="left" id="filter_ke">
														<textarea cols="80" rows="10"  id="statement" name="goods.stateMent">${goods.stateMent}</textarea>
												</td>
											</tr>   
											<tr>
												<td colspan="2" align="center">
													<input type="hidden" name="goods.id" value="${goods.id == null ? 0 :goods.id}">
													<input type="submit" value="提交">
													<input type="button" value="返回" onclick="javascript:window.history.go(-1)">
												</td>
											</tr>
										</table>
										   </div>
								<div class="info_bottom">&nbsp;</div>
									</form>
								</td>
							</tr>
						</table>
		</div>
						<div style="margin-top: 10px;">
		</div>    
		<center> <iframe src="../index/footer.html" width="970" height="120" frameborder="0" scrolling="no"></iframe> </center></body>
</html>
  <script>
			KE.show({
				id : 'content1',
				loadStyleMode : false,
				resizeMode : 0,
				allowUpload:true, //允许上传图片 
				imageUploadJson:'<%=basePath%>/comutil/upload.shtml',    
				items : [
				'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|','image']
			});
			KE.show({
				id : 'content2',
				loadStyleMode : false,
				resizeMode : 0,
				allowUpload:true, //允许上传图片 
				imageUploadJson:'<%=basePath%>/comutil/upload.shtml',    
				items : [
				'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist']
			});
			 function goback()
          {
            history.back();
          }
		</script>
